/** @type {import("prettier").Options} */
const config = {
  // 基础配置
  semi: false,
  singleQuote: true,
  tabWidth: 2,
  useTabs: false,
  trailingComma: "es5",
  endOfLine: "lf",
  printWidth: 80,

  // Vue 相关
  vueIndentScriptAndStyle: false,

  // 其他格式化选项
  bracketSpacing: true,
  bracketSameLine: false,
  arrowParens: "avoid",

  // 文件覆盖配置
  overrides: [
    {
      files: ["*.vue"],
      options: {
        parser: "vue",
      },
    },
    {
      files: ["*.json", "*.jsonc"],
      options: {
        parser: "json",
      },
    },
    {
      files: ["*.md"],
      options: {
        parser: "markdown",
        printWidth: 100,
      },
    },
  ],
};

export default config;
